package com.leslie.hhcommunity.service;

import com.leslie.hhcommunity.entity.DiscussPost;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author
 * @PackageName:com.leslie.hhcommunity.service
 * @ClassnName:DiscussService
 * @Description:
 * @Date 2021/12/31  17:47
 */
public interface DiscussPostService {

	List<DiscussPost> selectDiscussPosts(@Param("userId") int userId, @Param("offset") int offset,
										 @Param("limit") int limit, @Param("orderMode") int orderMode);

	int selectDiscussPostRows(@Param("userId") int userId);

	int insertDiscussPost(DiscussPost post);

	DiscussPost selectDiscussPostById(int id);

	int updateCommentCount(@Param("id") int id, @Param("commentCount") int commentCount);

	int updateType(@Param("id") int id, @Param("type") int type);

	int updateStatus(@Param("id") int id, @Param("status") int status);

	int updateScore(int postId, double score);
}
